package com.dsh.admin.manager.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dsh.admin.dao.ShopUserDao;
import com.dsh.admin.entity.ShopUser;
import com.dsh.admin.manager.ShopUserMng;

@Service
public class ShopUserMngImpl implements ShopUserMng {
	/**
	 * 检查用户名和密码
	 * @return
	 */
	@Override
	public ShopUser checkUsernameAndPwd(ShopUser bean) {
		return dao.checkUsernameAndPwd(bean);
	}
	/**
	 * 通过id查询对应的管理员信息
	 * @param id
	 * @return
	 */
	public ShopUser findById(Integer id){
		return dao.findById(id);
	}
	
	/**
	 * 更新
	 * @param bean
	 * @return
	 */
	public ShopUser update(ShopUser bean){
		return dao.update(bean);
	}
	
	private ShopUserDao dao;

	@Resource(name="shopUserDaoImpl")
	public void setDao(ShopUserDao dao) {
		this.dao = dao;
	}
	
	
	
}
